/*
Hermes Core: General Purpose Mobile Agent Platform
Copyright (C) 2006 UNICAM - Università degli Studi di Camerino

Group leaders: Flavio Corradini and Emanuela Merelli

Developers: Ezio Bartocci, Diego Bonura, Rosario Culmone,
Davide Lorenzoli, Leonardo Mariani, Francesca Piersigilli, 
Lorenzo Scortichini, Leonardo Vito.

GNU Lesser Public License

This library is free software; you can redistribute it 
and/or modify it under the terms of the GNU Lesser General 
Public License as published by the Free Software Foundation, 
version 2.1 of the License.

This library is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public 
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.

Emanuela Merelli
Dipartimento di Matematica ed Informatica
Università di Camerino
via Madonna delle Carceri, 62032 Camerino, Italy
E.Mail: emanuela.merelli@unicam.it
*/
package hermesV2;

import hermesV2.basicServices.communication.Receive;
import hermesV2.basicServices.communication.Send;

import hermesV2.basicServices.discovery.DiscoveryPlaces;
import hermesV2.basicServices.discovery.DiscoveryServiceAgents;
import hermesV2.basicServices.discovery.Update;

import hermesV2.basicServices.genesis.Genesis;

import hermesV2.basicServices.mobility.Move;

import hermesV2.basicServices.security.Security;


/**
 * Represents the collection of every component of the BasicService layer
 * present in the current place. It's usually created by the init method of
 * the Place class.
 *
 * @author Diego Bonura
 */
public class BasicServices {
    /** The move interface of the Mobility component. */
    private Move move;

    /** The send interface of the Communication component. */
    private Send send;

    /** The receive interface of the COmmunication component. */
    private Receive receive;

    /** The discovery interface of the Discovery component. */
    private DiscoveryServiceAgents discoveryServiceAgent;

    /** The discovery interface of the Discovery component. */
    private DiscoveryPlaces discoveryPlaces;
    
    /** The update interface of the Discovery component. */
    private Update update;

    /** The genesis interface of the Genesis component. */
    private Genesis genesis;

    /** The security interface of the SecurityManager component. */
    private Security security;

    /**
     * Creates a new istance.
     * @param <T>
     * 
     * @param move The Move interface of the Mobility component present in the
     * current Place.
     * @param send The send interface of the Communication component.
     * @param receive The receive interface of the COmmunication component.
     * @param discoveryServiceAgent The discovery service agents interface of the Discovery component.
     * @param discoveryPlaces The discovery places interface of the Discovery component.
     * @param update The update interface of the Discovery component.
     * @param genesis The genesis interface of the Genesis component.
     * @param security The security interface of the SecurityManager component.
     * 
     */
    public BasicServices(Move move, Send send, Receive receive, DiscoveryServiceAgents discoveryServiceAgent, DiscoveryPlaces discoveryPlaces, Update update, Genesis genesis, Security security) {
        this.move = move;
        this.send = send;
        this.receive = receive;
        this.discoveryServiceAgent = discoveryServiceAgent;
        this.discoveryPlaces = discoveryPlaces;
        this.update = update;
        this.genesis = genesis;
        this.security = security;
    }

    /**
     * Returns the Move interface of the Mobility component.
     * 
     * @return the Move interface of the Mobility component.
     */
    public Move getMoveInterface() {
        return this.move;
    }

    /**
     * Returns the Send interface of the Communication component.
     *
     * @return the Send interface of the Communication component.
     */
    public Send getSendInterface() {
        return this.send;
    }

    /**
     * Returns the Receive interface of the Communication component.
     *
     * @return the Receive interface of the Communication component.
     */
    public Receive getReceiveInterface() {
        return this.receive;
    }

    /**
     * Returns the Discovery service agents interface of the Discovery component.
     *
     * @return the Discovery service agents interface of the Discovery component.
     */
    public DiscoveryServiceAgents getDiscoveryServiceAgentInterface() {
        return this.discoveryServiceAgent;
    }
    
    /**
     * Returns the Discovery places interface of the Discovery component.
     *
     * @return the Discovery places interface of the Discovery component.
     */
    public DiscoveryPlaces getDiscoveryPlacesInterface() {
        return this.discoveryPlaces;
    }


    /**
     * Returns the Update interface of the Discovery component.
     *
     * @return the Update interface of the Discovery component.
     */
    public Update getUpdateInterface() {
        return this.update;
    }

    /**
     * Returns the Genesis interface of the Genesis component.
     *
     * @return the Genesis interface of the Genesis component.
     */
    public Genesis getGenesisInterface() {
        return this.genesis;
    }

    /**
             * Returns the Security interface of the Security component.
             *
             * @return the Security interface of the Security component.
             */
    public Security getSecurityInterface() {
        return this.security;
    }
}
